package com.panfeng.xcloud.component.sms.enums;

import java.util.Arrays;

/**
 * 用户语音验证码（语音验证码有可能应用在多个场景，目前暂时在，糖果转赠这个地方用到）
 */
public enum VoiceCodeBizTypeEnum {

    XD_SEND(1, "糖果转赠"),
    UNLOCK_RECOMMOND_COIN(2, "解锁荐币"),
    ;

    private Integer value;

    private String text;

    public static VoiceCodeBizTypeEnum of(Integer value) {
        if (value != null) {
            for (VoiceCodeBizTypeEnum s : values()) {
                if (s.value.equals(value)) {
                    return s;
                }
            }
        }
        return null;
    }


    public static boolean except(Integer value, VoiceCodeBizTypeEnum... status) {
        return (status != null && status.length > 0) && Arrays.asList(status).contains(of(value));
    }


	private VoiceCodeBizTypeEnum(Integer value, String text) {
		this.value = value;
		this.text = text;
	}


	public Integer getValue() {
		return value;
	}


	public void setValue(Integer value) {
		this.value = value;
	}


	public String getText() {
		return text;
	}


	public void setText(String text) {
		this.text = text;
	}

}
